<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <p>{{obj.name}}</p>
      <p>{{arr}}</p>
      <button @click="obj.name = 'zs'">往对象中添加一个属性</button>
      <button @click="arr[3]=4">往数组中添加一个数据</button>
      <button @click="arr.push(4)">往数组中添加一个数据</button>
    </div>

    <script src="./vue.js"></script>

    <script>
      const vm = new Vue({
        el: '#app',
        data: {
          obj: {},
          arr: [1, 2, 3],
        },
        methods: {},
      })
    </script>
  </body>
</html>
